let g:animal_name = 'Tom'
let g:is_cat = 1

let g:animal_name = 'TangLaoYa'
let g:is_cat = 0

echo g:animal_name . (g:is_cat ? ' is a cat' : ' is something else')